package com.base.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.base.mapper.voipmapper.RewardsMapper;
import com.base.po.voip.Rewards;
import com.base.service.RewardsService;
import com.base.utils.Page;

@Service("rewardsService")
public class RewardsServiceImpl implements RewardsService {
	@Autowired
	private RewardsMapper rewardsMapper;

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return rewardsMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Rewards record) {
		return rewardsMapper.insert(record);
	}

	@Override
	public int insertSelective(Rewards record) {
		return rewardsMapper.insertSelective(record);
	}

	@Override
	public int deleteByOrderId(String orderid) {
		return rewardsMapper.deleteByOrderId(orderid);
	}

	@Override
	public Rewards selectByPrimaryKey(Integer id) {
		return rewardsMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<Rewards> selectByPhase(String parentid, String userid) {
		return rewardsMapper.selectByPhase(parentid, userid);
	}

	@Override
	public List<Rewards> selectByWithdraw(String parentid, String userid) {
		return rewardsMapper.selectByWithdraw(parentid, userid);
	}

	@Override
	public List<Rewards> selectByOrderId(String orderid) {
		return rewardsMapper.selectByOrderId(orderid);
	}

	@Override
	public int updateByPrimaryKeySelective(Rewards record) {
		return rewardsMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Rewards record) {
		return rewardsMapper.updateByPrimaryKey(record);
	}

	@Override
	public int countBetweenType(String userid, Integer type1, Integer type2) {
		return rewardsMapper.countBetweenType(userid, type1, type2);
	}

	@Override
	public float countByIntegral(String parentid, String userid) {
		return rewardsMapper.countByIntegral(parentid, userid);
	}

	@Override
	public float countByBonus(String parentid, String userid) {
		return rewardsMapper.countByBonus(parentid, userid);
	}

	@Override
	public float countByExtra(String parentid, String userid) {
		return rewardsMapper.countByExtra(parentid, userid);
	}

	@Override
	public float countByFans(String parentid, String userid) {
		return rewardsMapper.countByFans(parentid, userid);
	}

	@Override
	public float countBySelfShop(String parentid, String userid) {
		return rewardsMapper.countBySelfShop(parentid, userid);
	}

	@Override
	public float countByRefund(String parentid, String userid) {
		return rewardsMapper.countByRefund(parentid, userid);
	}

	@Override
	public List<Rewards> selectByAll(Page page, String userid) {
		return rewardsMapper.selectByAll(page, userid);
	}

	@Override
	public List<Rewards> selectByAllLevel(Page page, String userid, Integer level, Integer type) {
		return rewardsMapper.selectByAllLevel(page, userid, level, type);
	}

	@Override
	public List<Rewards> selectAllByUserID(String userid) {
		return rewardsMapper.selectAllByUserID(userid);
	}

	@Override
	public List<Rewards> selectByPresentID(String presentid) {
		return rewardsMapper.selectByPresentID(presentid);
	}

	@Override
	public int selectByCount(String userid) {
		return rewardsMapper.selectByCount(userid);
	}

	@Override
	public List<Rewards> selectByUserIDAndParentID(Page page, String userid, String parentid) {
		
		return rewardsMapper.selectByUserIDAndParentID(page, userid, parentid);
	}

	@Override
	public List<Rewards> selectByUserIDAndPresentID(String userid, String presentid) {
		return rewardsMapper.selectByUserIDAndPresentID(userid, presentid);
	}

	@Override
	public List<Rewards> selectByType(Page page, String userid, Integer type) {
		return rewardsMapper.selectByType(page, userid, type);
	}

	@Override
	public List<Rewards> selectBetweenType(Page page, String userid, Integer type1, Integer type2) {
		return rewardsMapper.selectBetweenType(page, userid, type1, type2);
	}

	@Override
	public List<Rewards> selectByUserID(Page page, String userid, Integer level, String today, String yesterday) {
		return rewardsMapper.selectByUserID(page, userid, level, today, yesterday);
	}

	@Override
	public List<Rewards> selectByUserID2(Page page, String userid) {
		return rewardsMapper.selectByUserID2(page, userid);
	}

	@Override
	public int countByUserIDAndParentID(String userid, String parentid) {
		
		return rewardsMapper.countByUserIDAndParentID(userid, parentid);
	}

	@Override
	public int countByUserID(String userid, Integer level, String today, String yesterday) {
		return rewardsMapper.countByUserID(userid, level, today, yesterday);
	}

	@Override
	public int countByUserID2(String userid) {
		return rewardsMapper.countByUserID2(userid);
	}

	@Override
	public List<Rewards> selectAll(Page page, String type, String parentid, String userid, String presentid) {
		
		return rewardsMapper.selectAll(page, type, parentid, userid, presentid);
	}

	@Override
	public List<Rewards> selectByParentID(Page page, String parentid, String type, String userid, String presentid) {
		
		return rewardsMapper.selectByParentID(page, parentid, type, userid, presentid);
	}

	@Override
	public int countAll(String type, String parentid, String userid, String presentid) {
		
		return rewardsMapper.countAll(type, parentid, userid, presentid);
	}

	@Override
	public int countByParentID(String parentid, String type, String userid, String presentid) {
		
		return rewardsMapper.countByParentID(parentid, type, userid, presentid);
	}

	@Override
	public int countByAllLevel1(String userid) {
		return rewardsMapper.countByAllLevel1(userid);
	}

	@Override
	public int countByAllLevel2(String userid) {
		return rewardsMapper.countByAllLevel2(userid);
	}

	@Override
	public int countByLevel1And2(String userid) {
		return rewardsMapper.countByLevel1And2(userid);
	}

	@Override
	public int countByAllLevel3(String userid) {
		return rewardsMapper.countByAllLevel3(userid);
	}

	@Override
	public int countByLevel1(String userid) {
		return rewardsMapper.countByLevel1(userid);
	}

	@Override
	public int countByLevel2(String userid) {
		return rewardsMapper.countByLevel2(userid);
	}

	@Override
	public int countByLevel3(String userid) {
		return rewardsMapper.countByLevel3(userid);
	}

	@Override
	public int countByTodayLevel1(String userid) {
		return rewardsMapper.countByTodayLevel1(userid);
	}

	@Override
	public int countByTodayLevel2(String userid) {
		return rewardsMapper.countByTodayLevel2(userid);
	}

	@Override
	public int countByTodayLevel1And2(String userid) {
		return rewardsMapper.countByTodayLevel1And2(userid);
	}

	@Override
	public int countByTodayLevel3(String userid) {
		return rewardsMapper.countByTodayLevel3(userid);
	}

	@Override
	public int countByYesterdayLevel1(String userid) {
		return rewardsMapper.countByYesterdayLevel1(userid);
	}

	@Override
	public int countByYesterdayLevel2(String userid) {
		return rewardsMapper.countByYesterdayLevel2(userid);
	}

	@Override
	public int countByYesterdayLevel1And2(String userid) {
		return rewardsMapper.countByYesterdayLevel1And2(userid);
	}

	@Override
	public int countByYesterdayLevel3(String userid) {
		return rewardsMapper.countByYesterdayLevel3(userid);
	}

	@Override
	public float countBySelfShopNew(String parentid, String id) {
		 return rewardsMapper.countBySelfShopNew(parentid, id);
	}
}
